package math.geom3d;

import math.geomUtils.CurveType;

/**
 * @author Saga
 *
 */
public class LineSeg3d extends TrimmedCurve3d {
    public LineSeg3d(final Line3d _line, final double _firstParam, final double _lastParam) {
        super(_line, _firstParam, _lastParam);
    }

    @Override
    public CurveType getCurveType() {
        return CurveType.LINE_SEG;
    }

    @Override
    public final void reverse() {
        this.baseCurve.reverse();
        this.firstParam = -this.lastParam;
        this.lastParam = -this.firstParam;
    }

    @Override
    public final Curve3d reversed() {
        return new LineSeg3d((Line3d) this.baseCurve, -this.lastParam, -this.firstParam);
    }
}
